package de.szut.ita13.rs.wave.hud;

import java.awt.Color;
import java.awt.Graphics;

import de.szut.ita13.rs.wave.main.Game;

public class HUD {

	public static int HEALTH = 100;
	
	private int score = 0;
	private int level = 1;
	
	private int greenValue = 255;
	
	public void tick() {
		HEALTH = Game.clamp(HEALTH, 0, 100);
		greenValue = Game.clamp(greenValue, 0, 255);
		greenValue = HEALTH * 2;
		score++;
	}
	
	public void render(Graphics g) {
		g.setColor(Color.GRAY);
		g.fillRect(15, 15, 200, 32);
		g.setColor(new Color(75, greenValue, 0));
		g.fillRect(15, 15, HEALTH * 2, 32);
		g.setColor(Color.WHITE);
		g.drawRect(15, 15, 200, 32);
		g.drawString(String.valueOf(HEALTH), 190, 37);
		g.drawString("Score : " + score, 10, 64);
		g.drawString("Level : " + level, 10, 80);
	}

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}

	public int getLevel() {
		return level;
	}

	public void setLevel(int level) {
		this.level = level;
	}
	
	
}
